package com.yao.controller;

import org.springframework.security.core.userdetails.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * Copyright (C), 2022-2022, 姚兵
 * Author: 32210
 * Date: 2022/11/2 14:38
 * FileName: UserController
 * Description:
 */


@RestController
public class UserController {

    @RequestMapping("user-info")
    public Principal getUser(Principal principal){
        return principal;
    }
}
